package com.xdf.xzymanagementsystem.service;

import com.xdf.xzymanagementsystem.entity.BillType;
import com.xdf.xzymanagementsystem.entity.DeliveryList;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @program: xzy-management-system
 * @description: 存储过程调用
 * @author: 张柯
 * @create: 2021-01-07 16:41
 **/
public interface CallProcedureService {
    String salesOrderCodeGen(String prefix) throws Exception;

    String salesPlanCodeGen(String prefix) throws Exception;

    String deliveryCodeGen(String prefix) throws Exception;

    String deliveryBillCodeGen(String prefix);

    String productCodeGen(String prefix);

    List<Map<String, Object>> getSalesOrderReport(Date start, Date end, Boolean isFinished,Integer audit);
    List<Map<String, Object>> getSalesOrderReportCustomer(Date start, Date end,Integer audit);

    List<Map<String, Object>> getSalesPlanReport(Date start, Date end);

    List<Map<String, Object>> getPlanReport(Date start, Date end, Integer isFinished);
    List<Map<String, Object>> getExecPlanReport(Date start, Date end, Integer isFinished);

    List<Map<String, Object>> getPurchaseOrderReport(Date start, Date end);

    List<Map<String, Object>> getMaterialOrderBillReport(Date start, Date end);

    List<Map<String, Object>> getMaterialStoreReport();
    List<Map<String, Object>> getMaterialStoreReport8Store(String storeSid);

    List<Map<String, Object>> getMeterialTotalReport(Date start, Date end, String storeId);

    List<Map<String, Object>> getDeliveryPlanReport(Date start, Date end, Integer mode);

    List<Map<String, Object>> getDeliveryPlanReport(Date start, Date end, Integer mode,Integer isFinished);


    List<Map<String, Object>> getPlanReportSummary(Date start, Date end);

    List<Map<String, Object>> getPlanReportRegisteDtl(Long id);

    List<Map<String, Object>> getPlanReportRegisteDtl2(String machineCode, boolean isFinished);
    List<Map<String, Object>> getExecPlanReportRegisteDtl2(String machineCode, boolean isFinished);

    List<Map<String, Object>> getFinishedPlanReportRegisteDtl(Long id);

    List<Map<String, Object>> getMaterialList();

    List<Map<String, Object>> getProductOrderReport(Date start, Date end);

    // 成品库存表 - 盘点 - 多结果集
    List<Map<String,Object>> getProductOrderStoragePDMult();

    List<Map<String, Object>> getDeliveryBillReport(Date start, Date end);

    List<Map<String, Object>> getUnfinishedDeliveryPlan();

    List<Map<String, Object>> getNondeliveryPlanOrderReport();

    List<Map<String, Object>> getOutboundProductOrderReport(Date start, Date end);

    // 2021年9月28日 11:10:04 chanchaw 出货一览表
    List<Map<String, Object>> getDeliveryList(Date start, Date end, Integer contactCompanyId);

    List<Map<String, Object>> getUnfinishedDeliveryPlanDataSource(Integer contactCompanyId);

    List<Map<String, Object>> getStatementOfAccountReport(Date start, Date end);

    BigDecimal getMaterialStorage(String storageId, String productCoded);

    List<Map<String, Object>> getPurchaseOrderList(String productCoded);

    List<Long> getDeliveryList2Price();

    List<Long> getDeliveryListNoPrice();

    List<Map<String, Object>> getFuzzylookupSalesorderProductFile(String filter) throws Exception;

    List<DeliveryList> getDeliveryListNoPrice4Fix();
    List<DeliveryList> getDeliveryList2Price4Fix();
    List<Map<String,Object>> getAllDeliveryListIds();
    Integer updateDeliveryAllPrice();
    Integer updateSalesOrderDtlPrice(Long id);
    Integer updateDeliveryPlanPrice(Long id);
    Integer updateProductOrderPrice(Long id);
    Integer updateStatementAccount(Long id);
    List<Map<String,Object>> getUserOnlineStatus();
    void delDuplicateQualifier();
    List<Map<String,Object>> rptQuotation(Date sdate, Date edate, Integer state);
    List<BillType> getMaterialBillType();
    List<Map<String, Object>> getProductCraft8ProductCategories(List<Integer> categoryIdList);
    List<Map<String, Object>> getExecPlanReportRegisteDtl2Partial(String machineCode, boolean isFinished);
}
